<template>
    <div class="swiper">
            <div class="swiper-wrapper">
             <slot></slot>
            </div>
            <div class="swiper-pagination"></div>
        </div>
</template>
<script>
import Swiper from 'swiper/swiper-bundle'
import 'swiper/swiper-bundle.css'

export default {
     props:{
            loop:{
                type:Boolean,
                default:true
            }
        },
    mounted(){
        //  console.log("mounted");  
        var mySwiper = new Swiper ('.swiper', {
          direction: 'horizontal', // 垂直切换选项
          loop: true, // 循环模式选项
          autoplay:true,
          
          // 如果需要分页器
          pagination: {
            el: '.swiper-pagination',
          }
        }) 
        }
}
</script>